package com.ymttest.database.sqlwapper;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.couponupdatesetting;
import com.ymttest.utils.EnvSetup;

public class couponupdatesettingWapper {
	SqlManager manager;

    public couponupdatesettingWapper() {
        manager = new SqlManager("mysqlcoupon" + EnvSetup.getEnv());
    }

    public void updateByPrimaryKey(couponupdatesetting record) {
        manager
                .update(
                        "com.ymttest.database.mapping.couponupdatesettingMapper.updateByPrimaryKey",
                        record);
        manager.commit();
    }
    public couponupdatesetting selectTop1() {
    	couponupdatesetting result=new couponupdatesetting();
    	List<couponupdatesetting> lst=manager.getSelectResults
                (
                        "com.ymttest.database.mapping.couponupdatesettingMapper.selectTop1",
                        null);
        manager.commit();
        if(lst.size()>0)
        {
        	result=lst.get(0);
        }
        return result;
    }
   

    public static void main(String[] args) {
        YmtCouponWapper test = new YmtCouponWapper();

        System.out.println(test.useCoupon(20238699, "AIL7PT3W1",null));
        // test.insertYmtCouponSetting(3,11);
        // Logger.debug(test.getLastYmtCouponSettingId());


    }
}
